package ucd.csi.comp30220.fall2011.oteop.flughafen;

import java.io.Serializable;

import ucd.csi.comp30220.fall2011.oteop.navigation.Position;

/**
 * Stores informations about airport.
 * 
 * @author David Harrison
 */
public class AirportInfo implements Serializable {
    
    private static final long serialVersionUID = -6167651470746998087L;
    
    private String code;
    private Position position;
    private String name;
    
    public AirportInfo(String code, Position position) {
        this(code, position, "Airport at " +code);
    }
    
    /**
     * @param code IATA designation "DUB" for Dublin, "LHR" for Heathrow, etc.
     * @param position lat/lon of where the airport is
     * @param name long name of the airport, like "Dublin" or "London Heathrow" 
     */
    public AirportInfo(String code, Position position, String name) {
        this.code = code;
        this.position = position;
        this.name = name;
    }
    
    public String getCode() {
        return code;
    }
    
    public Position getPosition() {
        return position;
    }
    
    public String getName() {
        return name;
    }

    @Override
    public String toString() {
        return "AirportInfo [code=" + code + ", position=" + position
                + ", name=" + name + "]";
    }
}